# Base image for etcd server
FROM        centos:7.2.1511
MAINTAINER  Andy Zhang <zch@cn.ibm.com>

RUN         yum install -y postgresql-server postgresql-contrib
ENV         PGDATA /var/lib/postgresql/data
ENV         PG_VERSION 9.2
VOLUME      $PGDATA
EXPOSE      5432
COPY        docker-entrypoint.sh /
RUN	        chmod a+x docker-entrypoint.sh && yum install -y sudo
ENTRYPOINT  ["/docker-entrypoint.sh"]
CMD         ["postgres"]
LABEL        version="{{ image_version }}"
